package com.njuse.jvmfinal.Instruction;

import java.nio.ByteBuffer;

import com.njuse.jvmfinal.runtimestructure.Jframe;

public class GOTO extends Instruction {
	private int  offset;
	
	public  void readindex(ByteBuffer reader) {
		this.offset=(int)reader.getShort();
	}
	
	public  void execute(Jframe frame) {
			frame.setPc(frame.getPc()-3+offset);
	}
}
